<template>
<!--项目成果-->
  <div class="projectResult">
    <el-table
      :data="tableData"
      border
      @row-click="(row)=>{handleClick({name: '项目档案', value: 'xmda', row: row})}"
      :header-cell-style="{backgroundColor: '#e7f6f3'}"
      style="width: 100%">
      <el-table-column prop="entryName" label="项目名称"></el-table-column>
      <el-table-column prop="entryNumber" label="项目编号"></el-table-column>
      <el-table-column prop="planStartTime" label="开始日期" with="100px"></el-table-column>
      <el-table-column prop="planEndTime" label="结束日期"></el-table-column>
      <el-table-column prop="bearFruit" label="取得成果"></el-table-column>
    </el-table>
    <pagination v-show="total>0" :total="total" :page.sync="pageNum" :limit.sync="pageSize" style="margin: 0 25px 28px;"/>
    <el-dialog :title="modalTitle" :visible.sync="modalState" @close="closeModal" :width="modalWidth" :close-on-click-modal="false">
      <quick-dialog :modalRow="modalRow"></quick-dialog>
    </el-dialog>
  </div>
</template>

<script>
import QuickDialog from "@/views/leader/components/quickDialog";
export default {
  name: "projectResult",
  components: {QuickDialog},
  data(){
    return{
      modalTitle:'',
      modalState:false,
      modalWidth:'',
      total:0,
      tableData: [
        {entryName:'风光一体化防沙治沙',entryNumber:'FZFS202402001',planStartTime:'2024-02-11',planEndTime:'2025-02-11',bearFruit:'实现了三北工程攻坚战良好开局。今年，已完成防沙治沙604万亩，是去年同期完成量的近4倍。'},
        {entryName:'三北六期',entryNumber:'SBLQ202400011',planStartTime:'2024-02-11',planEndTime:'',bearFruit:'呼和浩特市“三北”工程六期总任务是228.41万亩，2021至2023年已完成71.58万亩，剩余任务156.83万亩'},
        {entryName:'蚂蚁森林',entryNumber:'MYSL24010001',planStartTime:'2024-02-11',planEndTime:'',bearFruit:'造林季节可为当地劳动力提供整地、造林、安装网围栏等工作。同时，项目区周边牧民为项目提供造林苗木，可提高经济收入。通过劳务输出可提高当地牧民人均收入。'},
        {entryName:'蓝旗机器人造林',entryNumber:'JQR202402001',planStartTime:'2024-02-11',planEndTime:'2025-02-11',bearFruit:'本次项目是由内蒙古林草生态建设有限责任公司防沙治沙机械作业队率先在正蓝旗组织实施，投入了全自动荒漠化综合治理机器人、半自动荒漠化综合治理机器人等多台机械装备，将完成治沙任务2000亩，让治沙变得更高效、更精准、更便捷。'},
      ],
      pageNum: 1,
      pageSize: 10,
      modalPic:'',
      modalRow:{}
    }
  },
  mounted() {
    this.total = this.tableData.length
  },
  methods:{
    closeModal(){
      this.modalState = false
    },
    //选中列表-行
    handleClick(data) {
      this.modalState = true
      this.modalWidth = '50%'
      this.modalRow = data
    },
  }
}
</script>

<style scoped>
.projectResult {
  margin: 15px;
}
</style>
